<template>
	<div>
		<div class="topButton">
			<el-button type="primary" plain size="mini" @click="register">报名</el-button>
		</div>
		<el-table :data="pageData.items" style="width: 100%">
			<el-table-column prop="name" label="姓名"></el-table-column>
			<el-table-column prop="phone" label="电话"></el-table-column>
			<el-table-column prop="jobNumber" label="工号"></el-table-column>
			<!-- <el-table-column prop="rz" label="平台认证">
				<template slot-scope="scope">
					<span>{{scope.row.rz}}</span>
				</template>
			</el-table-column> -->
			<el-table-column label="主团队及部门">
				<template slot-scope="scope">
					<span>{{scope.row.mainCompanyName}} - {{scope.row.departmentName}}</span>
				</template>
			</el-table-column>
			<el-table-column prop="dutiesName" label="职务"></el-table-column>
			<!-- <el-table-column prop="zj" label="职级"></el-table-column> -->
			<el-table-column prop="posts" label="岗位"></el-table-column>
		</el-table>
		<div class="flex" style="justify-content: space-between;align-items: center;">
			<span style="margin-top: 20px;color: #333333;margin-left: 20px;">共 {{ pageData.totalNum?pageData.totalNum:0 }} 人</span>
			<pagina-tion :totalNum="pageData.totalNum" @paginaClick="paginaClick"></pagina-tion>
		</div>
		<!-- <pagina-tion :totalNum="pageData.totalNum" @paginaClick="paginaClick"></pagina-tion> -->
	</div>
</template>

<script>
	export default {
		data() {
			return {
				tableData: [{
					date: '500235-123',
					name: '王小虎',
					td: '重庆三峡农夫科技有限公司技术部',
					rz: '已认证',
					zw: '管理员，经理',
					zj: '高级工程师',
					gw: '硬件工程师'
				}],
				queryData: {
					classId: '',
					page: 1,
					pageSize: $globalData.pageSize
				},
				pageData: ''
			}
		},
		mounted() {
			this.getPageData()
		},
		methods: {
			paginaClick(val) {
				this.queryData.page = val
				this.getPageData()
			},
			getPageData() {
				// 获取学员列表
				// getStudents
				this.queryData.classId = this.$route.params.id
				this.$request.postForm(this.$api.getStudents, this.queryData).then(res => {
					if (res.code == 200) {
						this.pageData = res.data
					}
				})
			},
			register(){
				// 报名
				
			}
		}
	}
</script>

<style scoped="scoped">
	.topButton {
		padding: 10px 0;
		text-align: right;
	}
</style>
